using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Resources;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.HRM
{
    [DataContract]
	[Table("hrm_ps_absence")]
    public class PsAbsence
    {
		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember, Column("absence_seq"), Display(Name = "AbsenceId", ResourceType = typeof(Resources.PsAbsenceResource))]
        public int AbsenceId { get; set; }
         
		[DataMember, Column("ref_no"), Display(Name = "Code", ResourceType = typeof(Resources.PsAbsenceResource))]
        public string Code { get; set; }

		[ForeignKey("AbsenceType")]
		[DataMember, Column("absence_type_seq"), Display(Name = "AbsenceTypeId", ResourceType = typeof(Resources.PsAbsenceResource))]
        public int? AbsenceTypeId { get; set; }

		[DataMember, Column("bgm_year"), Display(Name = "BgmYear", ResourceType = typeof(Resources.PsAbsenceResource))]
        public int? BgYear { get; set; }

        [ForeignKey("Employee")]
		[DataMember, Column("emp_seq"), Display(Name = "EmpId", ResourceType = typeof(Resources.PsAbsenceResource))]
        public int? EmpId { get; set; }

		[DataMember, Column("start_date"), Display(Name = "StartDate", ResourceType = typeof(Resources.PsAbsenceResource))]
        public DateTime? StartDate { get; set; }

		[DataMember, Column("start_time"), Display(Name = "StartTime", ResourceType = typeof(Resources.PsAbsenceResource))]
        public string StartTime { get; set; }

		[DataMember, Column("end_date"), Display(Name = "EndDate", ResourceType = typeof(Resources.PsAbsenceResource))]
        public DateTime? EndDate { get; set; }

		[DataMember, Column("end_time"), Display(Name = "EndTime", ResourceType = typeof(Resources.PsAbsenceResource))]
        public string EndTime { get; set; }

		[DataMember, Column("time_count"), Display(Name = "DayCount", ResourceType = typeof(Resources.PsAbsenceResource))]
        public decimal? TimeCount { get; set; }

		[DataMember, Column("day_count"), Display(Name = "DayCount", ResourceType = typeof(Resources.PsAbsenceResource))]
        public decimal? DayCount { get; set; }

		[DataMember, Column("contact_address"), Display(Name = "ContactAddress", ResourceType = typeof(Resources.PsAbsenceResource))]
        public string ContactAddress { get; set; }

		[DataMember, Column("remarks"), Display(Name = "Remarks", ResourceType = typeof(Resources.PsAbsenceResource))]
        public string Remarks { get; set; }

		[DataMember, Column("record_status"), Display(Name = "RecordStatus", ResourceType = typeof(Resources.PsAbsenceResource))]
        public string RecordStatus { get; set; }

		[DataMember, Column("created_by"), Display(Name = "CreatedBy", ResourceType = typeof(Resources.PsAbsenceResource))]
        public int? CreatedBy { get; set; }

		[DataMember, Column("created_when"), Display(Name = "CreatedWhen", ResourceType = typeof(Resources.PsAbsenceResource))]
        public DateTime? CreatedWhen { get; set; }

		[DataMember, Column("updated_by"), Display(Name = "UpdatedBy", ResourceType = typeof(Resources.PsAbsenceResource))]
        public int? UpdatedBy { get; set; }

		[DataMember, Column("updated_when"), Display(Name = "UpdatedWhen", ResourceType = typeof(Resources.PsAbsenceResource))]
        public DateTime? UpdatedWhen { get; set; }

		[DataMember, Column("description"), Display(Name = "Description", ResourceType = typeof(Resources.PsAbsenceResource))]
        public string Description { get; set; }

        [DataMember, Display(Name = "HrmPsAbsenceType", ResourceType = typeof(Resources.PsAbsenceResource))]
		public virtual PsAbsenceType AbsenceType { get; set; }

        [DataMember, Column("request_title")] 
        public virtual string RequestTitle { get; set; }

        [DataMember]
        public virtual Employee Employee { get; set; }

    }
}